<!doctype html>
<html>
<head>
    <title>产品列表</title>
    <?php $this->load->module('admin/index/page_header');?>
    <link href="<?php echo URLPRE;?>static/admin/css/font_icon.css" rel="stylesheet" />

</head>
<body>
<div id="mainContent" class="wrap">
    <div class="nav">
        <ul>
            <li class="current"><a href="javascript:void(0)">产品列表</a></li>
            <li><a href="<?php echo $add_url;?>">添加产品</a></li>
        </ul>
    </div>


    <div id="content" class="table_full">
        <form method="get" action="">

                <div class="h_a">高级搜索</div>
                <table width="100%" class="table-search-wrap">
                    <tbody>
                    <tr>
                        <td>
                            产品名称：<input type="text" name="keywords" value="<?php echo $condition['keywords']?>" placeholder="产品名称"  class="input rounded"   />&nbsp;&nbsp;
                            订单状态：<select name="type" class="select rounded">
                                <option value="-1" <?php if($condition['type'] == '-1') echo 'selected';?>>全部</option>
                                <option value="0" <?php if($condition['type'] == 0)echo 'selected';?>>菜品</option>
                                <option value="1" <?php if($condition['type'] == 1)echo 'selected';?>>酒水</option>
                            </select>
                            &nbsp;&nbsp;
                            &nbsp;&nbsp;<input type="submit" class="btn" value="搜索">
                        </td>
                    </tr>
                    </tbody>
                </table>
            
            <div class="h_a">产品列表</div>
            <table width="100%">
                <tr>
                    <th>ID</th>
                    <th>类型</th>
                    <th>产品名称</th>
                    <th>产品价格</th>
                    <th>创建时间</th>
                    <th>操作</th>
                </tr>
                <?php if(isset($list)&&!empty($list)):?>
                    <?php foreach($list as $k=>$v):?>
                        <tr>
                            <td><a href="javascript:;"  target="_blank"><?php echo $v['id'];?></a></td>
                            <td style="width:6%;"><?php echo $v['type']?'酒水':'菜品';?></td>
                            <td style="width:6%;"><?php echo $v['name'];?></td>
                            <td style="width:4%;"><?php echo $v['money'];?></td>
                            <td style="width:4%;"><?php echo $v['crts'];?></td>
                            <td style="width:4%" class="btn_min">
                                <a class="icon-pencil" href="<?php echo site_url('hotel/admin/edit_product/'.$v['id']);?>">编辑</a>
                                <a class="icon-remove-2 doDel" href="javascript:;" data-uri="<?php echo site_url('hotel/admin/delete_product?id='.$v['id']);?>">删除</a>
                            </td>
                        </tr>
                    <?php endforeach ;?>
                <?php endif;?>


            </table>
        </form>
        <div class="page_nav">
            <?php echo $this->mypageclass->show(2); ?>
        </div>
    </div>
</div>

</body>
</html>